<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改接受任务')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-task-accept-edit">
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-2 control-label">任务标题：</label>
                <div class="col-sm-9">
                    <input type="text" required maxlength="50"  th:field="*{task.taskTitle}"  class="form-control" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">紧急程度：</label>
                <div class="col-sm-9">
                    <th:block th:if="*{task.priority}==1">
                        <input type="text" required maxlength="50"  value="紧急"  class="form-control" readonly>
                    </th:block>
                    <th:block th:if="*{task.priority}==2">
                        <input type="text" required maxlength="50"  value="非常紧急"  class="form-control" readonly>
                    </th:block>
                    <th:block th:if="*{task.priority}==0">
                        <input type="text" required maxlength="50"  value="普通"  class="form-control" readonly>
                    </th:block>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">执行人员：</label>
                <div class="col-sm-9">
                    <input type="text" required maxlength="50"  class="form-control"  th:value="${task.userName}" th:field="*{task.userName}" readonly>
                    <input id="taskId" name="taskId" th:value="${task.taskId}" type="hidden"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">任务时间：</label>
                <div class="col-sm-9">
                    <div class="input-daterange input-group">
                        <input type="text" class="input-sm form-control" id="datetimepicker-startTime" th:field="*{task.starttime}" placeholder="开始时间" readonly>
                        <span class="input-group-addon">-</span>
                        <input type="text" class="input-sm form-control" id="datetimepicker-endTime" placeholder="结束时间" th:field="*{task.endtime}" readonly>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">任务状态：</label>
                <div class="col-sm-2">
                    <label class="radio-box">
                        <div><input type="radio" checked value="2" th:field="*{task.status}" name="status" style="position: absolute; opacity: 0;"></div>未完成
                    </label>
                </div>
                <div class="col-sm-2">
                    <label class="radio-box" >
                        <div><input type="radio" value="1" th:field="*{task.status}" name="status" style="position: absolute; opacity: 0;"></div>已完成
                    </label>
                </div>
                <div class="col-sm-2">
                    <label class="radio-box">
                        <div><input type="radio" value="0" th:field="*{task.status}" name="status" style="position: absolute; opacity: 0;"></div>已放弃
                    </label>
                </div>
            </div>
        </div>
    </form>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
    var prefix = ctx + "system/task/accept";

    $("#form-task-accept-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-task-accept-edit').serialize());
        }
    }

</script>
</body>
</html>
